home *** CD-ROM | disk | FTP | other *** search
- Subject: Setting Context
- Sent: 3/10/96 9:50 PM
- Received: 3/11/96 8:27 AM
- From: Gary Ashcraft, ashcraft@itsnet.com
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- Henri & team,
- I have a part which is based on ODF Draw (d11). Within my content view,
- I've embedded some subframes.
-
- I'm trying to understand the correct way to set the context so I can render
- within these subframes. I've tried using FW_CViewContext,
- FW_CFacetContext, and FW_CPlatformGraphicContext (individually, of course).
- I want to set the context and then render within the frame using a mix of
- ODF rendering methods and native calls. I would expect that after setting
- the context, my rendering would be clipped to the subframe and all of my
- rendering would also be relative to the subframe (nominally the topLeft
- corner).
-
- Here's what I experienced using the above-listed contexts within the
- subframe's draw methods:
- FW_CViewContext
- Native calls : rendering was relative to window's origin.
- ODF : rendering was relative to contentview origin.
- Clipping : clipped to frame, but if content view is scrolled,
- overwrites scrollers & rulers.
- FW_CFacetContext
- Native calls : rendering was relative to window's origin.
- ODF : rendering was relative to contentview origin
- Clipping : didn't clip. If scrolled, ODF calls were offset as
- expected, but native calls still were relative to window origin.
- FW_CPlatformGraphicContext
- Native calls : rendering was relative to contentview origin
- ODF : rendering was relative to contentview origin
- Clipping : clipped to frame, but if content view is scrolled,
- overwrites scrollers & rulers.
-
- >From my experimentation it looks like FW_CPlatformGraphicContext is the
- only case where ODF rendering and native rendering calls are in
- registration with one another. However, even using
- FW_CPlatformGraphicContext, I still have to clip out the rulers and
- scrollers myself, and do a transformation to convert my coordinates from
- frame coordinates to contentview-relative.
-
- Do I need to make another call to correctly set up the transform? I had
- assumed these calls would set up the transform for me; either they don't,
- or something's wrong with my subframe.
-
- I would appreciate any additional explanation which you feel would help me
- better understand the relationship between these three calls, and the
- context in which each should be used. (I've read both chapter 7 in the ODF
- Developers Guide and the ODF View System document, provided with d11)
-
- Regards,
-
- Gary Ashcraft
- ashcraft@itsnet.com
-
-